﻿using UnityEditor.Experimental.GraphView;
using UnityEngine.UIElements;

namespace E.Story
{
    /// <summary>
    /// 导航地图（此类不知为啥样式显示有点问题，暂时不用）
    /// </summary>
    public class NavMap : MiniMap
    {
        public void Init()
        {
            anchored = false;
            visible = false;
        }

        public override void BuildContextualMenu(ContextualMenuPopulateEvent evt)
        {
            if (!windowed)
            {
                evt.menu.AppendAction(anchored ? "浮动" : "固定",
                    action => { anchored = !anchored; },
                    DropdownMenuAction.AlwaysEnabled);
            }
        }
    }
}